#include "lb_changetex.h"
#include "ui_lb_changetex.h"


#include <QString>
#include <QMessageBox>
#include <QPalette>


LB_changetex::LB_changetex(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::LB_changetex)
{
    ui->setupUi(this);

    //QPixmap pixmap = QPixmap("D://Qt//workspace//bookManager//pictures//xiyang.jpg").scaled(this->size());
    QPixmap pixmap = QPixmap("D://CsSoftware//Qt//__MyFiles//workspace//bookManager//pictures//xiyang.jpg").scaled(this->size());
    QPalette palette(this->palette());
    palette.setBrush(QPalette::Background,pixmap);
    this->setPalette(palette);

}

LB_changetex::~LB_changetex()
{
    delete ui;
}

void LB_changetex::on_pushButton_clicked()
{
    QString input = this->ui->lineEdit->text();
    QString oldTex = input;
    for(int i = 0;dataArray[i].isbn!='\0';i++){
        dataArray[i].tex = input;
    }
    QString content = "老税率：" + oldTex + '\n' + "新的税率：" + input;
    QMessageBox::question(this,"请确认信息",content,"确认","取消");
}

void LB_changetex::on_pushButton_2_clicked()
{
    this->close();
}
